package library_system.model;

import java.util.Objects;

/**
 * @author haomin
 * @date 2022/04/05 22:01
 **/
public class Book {
    public Integer bid;
    public String name;
    public int stock;
    public int total;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Book book = (Book) o;
        return bid == book.bid && Objects.equals(name, book.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(bid, name);
    }
}